<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

    <ui:composition template="/template.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateHotelTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <h:panelGroup id="messagePanel" layout="block">
                <h:messages errorStyle="color: red" infoStyle="color: green" layout="table"/>
            </h:panelGroup>
            <h:form>
                <h:panelGrid columns="2">
                    <h:outputLabel value="#{bundle.CreateHotelLabel_idHotel}" for="idHotel" />
                    <h:inputText id="idHotel" value="#{hotelController.selected.idHotel}" title="#{bundle.CreateHotelTitle_idHotel}" required="true" requiredMessage="#{bundle.CreateHotelRequiredMessage_idHotel}"/>
                    <h:outputLabel value="#{bundle.CreateHotelLabel_name}" for="name" />
                    <h:inputText id="name" value="#{hotelController.selected.name}" title="#{bundle.CreateHotelTitle_name}" required="true" requiredMessage="#{bundle.CreateHotelRequiredMessage_name}"/>
                    <h:outputLabel value="#{bundle.CreateHotelLabel_brandName}" for="brandName" />
                    <h:inputText id="brandName" value="#{hotelController.selected.brandName}" title="#{bundle.CreateHotelTitle_brandName}" required="true" requiredMessage="#{bundle.CreateHotelRequiredMessage_brandName}"/>
                    <h:outputLabel value="#{bundle.CreateHotelLabel_brandCode}" for="brandCode" />
                    <h:inputText id="brandCode" value="#{hotelController.selected.brandCode}" title="#{bundle.CreateHotelTitle_brandCode}" required="true" requiredMessage="#{bundle.CreateHotelRequiredMessage_brandCode}"/>
                    <h:outputLabel value="#{bundle.CreateHotelLabel_country}" for="country" />
                    <h:inputText id="country" value="#{hotelController.selected.country}" title="#{bundle.CreateHotelTitle_country}" required="true" requiredMessage="#{bundle.CreateHotelRequiredMessage_country}"/>
                    <h:outputLabel value="#{bundle.CreateHotelLabel_countryPhoneCode}" for="countryPhoneCode" />
                    <h:inputText id="countryPhoneCode" value="#{hotelController.selected.countryPhoneCode}" title="#{bundle.CreateHotelTitle_countryPhoneCode}" required="true" requiredMessage="#{bundle.CreateHotelRequiredMessage_countryPhoneCode}"/>
                    <h:outputLabel value="#{bundle.CreateHotelLabel_address}" for="address" />
                    <h:inputText id="address" value="#{hotelController.selected.address}" title="#{bundle.CreateHotelTitle_address}" />
                    <h:outputLabel value="#{bundle.CreateHotelLabel_zip}" for="zip" />
                    <h:inputText id="zip" value="#{hotelController.selected.zip}" title="#{bundle.CreateHotelTitle_zip}" />
                    <h:outputLabel value="#{bundle.CreateHotelLabel_categoryDescription}" for="categoryDescription" />
                    <h:inputText id="categoryDescription" value="#{hotelController.selected.categoryDescription}" title="#{bundle.CreateHotelTitle_categoryDescription}" />
                    <h:outputLabel value="#{bundle.CreateHotelLabel_telephone}" for="telephone" />
                    <h:inputText id="telephone" value="#{hotelController.selected.telephone}" title="#{bundle.CreateHotelTitle_telephone}" />
                    <h:outputLabel value="#{bundle.CreateHotelLabel_conveniences}" for="conveniences" />
                    <h:inputText id="conveniences" value="#{hotelController.selected.conveniences}" title="#{bundle.CreateHotelTitle_conveniences}" />
                </h:panelGrid>
                <br />
                <h:commandLink action="#{hotelController.create}" value="#{bundle.CreateHotelSaveLink}" />
                <br />
                <br />
                <h:commandLink action="#{hotelController.prepareList}" value="#{bundle.CreateHotelShowAllLink}" immediate="true"/>
                <br />
                <br />
                <h:commandLink value="#{bundle.CreateHotelIndexLink}" action="/index" immediate="true" />
            </h:form>
        </ui:define>
    </ui:composition>

</html>
